home *** CD-ROM | disk | FTP | other *** search
INI File | 1996-01-16 | 6.0 KB | 196 lines |
- DefineVariables
- Text [ProductName] := Allied General DEMO
- Text [ItemName] := Allied General DEMO
- Text [MainExeName] := AGDEMO.EXE
- Text [ProductIniFile] := AG.INI
- Text [ProgGrpName] := Allied General DEMO
- Text [ProgGrpFileName] := ALLIEDDE.GRP
- Text [Language] := English
- Number [Continue] := 1011
-
- Text [AreYouSureText] := Are you sure you wish to completely remove the selected application and all it's components?
- Text [ReadyToDeleteText] := Ready to delete all files in
- Text [YES_text] := Yes
- Text [NO_text] := No
- Text [DelteingFilesText] := Please wait...
- Text [UninstallText] := Uninstall
- Logical [IsWinNT] := N
- Logical [IsWin95] := N
- EndDefineVariables
-
- SetDefaultBitmap Off
- SetInstallModeTo Install
- SetTraceMode Off
- SetExitConfirmationPrompt off
- SetPopupBorderTo double
- SetReplacementInquiry Off
-
- Do CheckIfWindows95
- Do SetInstallDir
- Do GetLanguageIndex
- Do SetLanguage
- SetTopLineTo [ProductName] [UninstallText]
- ShowWindow Maximize
- Do CheckIfSure
- SoLong Quietly
-
- Procedure CheckIfWindows95
- If WIN32
- If WindowsVersion >= 3.95
- [IsWin95] := Y
- Else
- [IsWinNT] := Y ;; Windows NT
- Endif
- Else
- [IsWin95] := N ;; Win 3.1
- EndIf
- EndProcedure
-
- Procedure SetInstallDir
- [Number1] := LengthOf [InstallFromDirectory]
- DecrementNumber [Number1]
- [String1] := SubstringOf [InstallFromDirectory] from Beginning to [Number1]
- [InstallationDirectory] := [String1]
-
- EndProcedure
-
- Procedure UNINSTALL
- If DirectoryExists [InstallationDirectory]
- TextBox BlackOnLightGray
- [DelteingFilesText]
- EndTextBox
- If DirectoryExists [InstallationDirectory]\DATA
- DeleteFiles from [InstallationDirectory]\DATA
- *.*
- EndDeleteFiles
- DeleteDirectory [InstallationDirectory]\DATA
- EndIf
-
- If DirectoryExists [InstallationDirectory]\ART
- DeleteFiles from [InstallationDirectory]\ART
- *.*
- EndDeleteFiles
- DeleteDirectory [InstallationDirectory]\ART
- EndIf
- If DirectoryExists [InstallationDirectory]\SCENARIO
- DeleteFiles from [InstallationDirectory]\SCENARIO
- *.*
- EndDeleteFiles
- DeleteDirectory [InstallationDirectory]\SCENARIO
- EndIf
- If [IsWin95]
- Run [InstallationDirectory]\REGISTRY.EXE [InstallationDirectory]\UAG.RGS
- EndIf
- DeleteFiles from [InstallationDirectory]
- *.*
- EndDeleteFiles
- DeleteDirectory [InstallationDirectory]
-
- If [IsWin95]
- [String1] := [WindowsDirectory]\Start Menu\Programs\[ProductName]
- LFNGetShortPathName [String1] [String2]
- If [String2] <> BlankString
- ProgramManagerDDE
- ShowGroup([ProgGrpName],2)
- DeleteItem([ProgGrpName])
- DeleteGroup([ProgGrpName])
- EndProgramManagerDDE
- EndIf
- Else
- If FileExists [WindowsDirectory]\[ProgGrpFileName]
- ProgramManagerDDE
- DeleteGroup([ProgGrpName])
- EndProgramManagerDDE
- EndIf
- If [IsWinNT]
- ProgramManagerDDE
- DeleteGroup([ProgGrpName])
- EndProgramManagerDDE
- EndIf
- EndIf
- EndIf
- EndProcedure
-
- Procedure CheckIfSure
- DialogBox 200 60 UseHeader "Allied General DEMO " Returns [Continue] BlackOnLightGray ModalFrame
- CText @xy(0,10) 200 70 [AreYouSureText]
- DefPushButton @xy( 30, 35) 40 16 [YES_text] 1012
- PushButton @xy(125, 35) 40 16 [NO_text] 1011
- EndDialogBox
-
- ClearScreen
-
- If [Continue] = 1012
- GoTo Uninst
- DialogBox 200 60 UseHeader "Allied General DEMO " Returns [Continue] BlackOnLightGray ModalFrame
- CText @xy(0,10) 200 70 [ReadyToDeleteText]
- DefPushButton @xy( 30, 35) 40 16 [YES_text] 1015
- PushButton @xy(125, 35) 40 16 [NO_text] 1016
- EndDialogBox
- Else
- SoLong
- EndIf
-
- ClearScreen
-
- if [Continue] = 1015
- :Uninst
- Do UNINSTALL
- Else
- SoLong
- EndIf
- EndProcedure
-
- Procedure GetLanguageIndex
-
- If FileExists [InstallFromDirectory]\AUTOHD.INI
- ClearArray [Array1]
- [Array1][1] := Language
- [Array1][2] := which
- [Array1][3] := English
- [Array1][4] := [InstallFromDirectory]\AUTOHD.INI
-
- GetPrivateProfileString Using [Array1]
- [Language] := [Array1][5]
- EndIf
- EndProcedure
-
- Procedure SetLanguage
- If [Language] = English
- [ReadyToDeleteText] := Ready to delete all files in [InstallationDirectory].
- EndIf
- If [Language] = French
- [DelteingFilesText] := Veuillez patienter...
- [AreYouSureText] := Voulez-vous supprimer dΘfinitivement l'application sΘlectionnΘe et tous ses composants ?
- [ReadyToDeleteText] := PrΩt α effacer tous les fichiers dans [InstallationDirectory].
- [YES_text] := Oui
- [NO_text] := Non
- [UninstallText] := DΘsinstaller
- EndIf
- If [Language] = German
- [DelteingFilesText] := Bitte warten...
- [ReadyToDeleteText] := Bereit, um alle Dateien in [InstallationDirectory] zu l÷schen.
- [AreYouSureText] := Sind Sie sicher, da▀ Sie die gewΣhlte Anwendung und ihre ganzen Komponenten vollstΣndig entfernen wollen?
- [YES_text] := Ja
- [NO_text] := Nein
- [UninstallText] := Entfernen
- EndIf
- If [Language] = Spanish
- [DelteingFilesText] := Espere, por favor...
- [ReadyToDeleteText] := Listo para borrar todos los ficheros en [InstallationDirectory].
- [AreYouSureText] := ┐Estß seguro de querer eliminar la aplicaci≤n seleccionada y todos sus componentes?
- [YES_text] := Sφ
- [NO_text] := No
- [UninstallText] := Desinstalar
- EndIf
- If [Language] = Italian
- [DelteingFilesText] := Attendere...
- [ReadyToDeleteText] := Pronto a cancellare tutti i file in [InstallationDirectory].
- [AreYouSureText] := Si desidera eliminare completamente l'applicazione selezionata e tutti i suoi componenti?
- [YES_text] := S∞
- [NO_text] := No
- [UninstallText] := Disinstalla
- EndIf
- EndProcedure
- EndScript
-